﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="web._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>欢迎进入物业管理信息系统</title>
    <script type ="text/javascript" >
        var number = Math.random();
        var foot = Math.round(number * (10000 - 1)) + 1;
    function openMain(){
        if(window.name!='miswin'){
			//	url = 'login.aspx?formurl=MyLogin';
		    	var url = "main.aspx";
				window.opener = null;
				s = window.open(url, foot, 'resizable=yes');
				s.moveTo(0, 0);
				s.resizeTo(screen.availWidth, screen.availHeight);
				s.focus();
	   		    window.opener = null;
				window.open("", "_self");     //IE7
				window.close();
        }
}

function setEvents() {
    var objChild;                           // Window
    var reWork = new RegExp('object', 'gi'); // Regular expression

    try {
        objChild = window.open('', 'child', 'width=50,height=50,status=no,resizable=yes');
        objChild.opener = null; //新加，去掉win2000下的关闭提示
        objChild.close();
    }
    catch (e) { }

    if (!reWork.test(String(objChild))) {
        alert('弹出窗口被拦截!\n如果您正在使用非IE浏览器请使用IE打开.\n如果您使用IE并安装弹出窗口拦截插件,请设置允许本窗口打开.');
    }
    else {
        openMain();
    } 
}
    
    
    </script>
</head>
<body bgcolor="#ffffff" onload="setEvents();">
    
</body>
</html>
